<template>
	<!-- 启动页面 -->
	<view class="init">
		<view class="init__box">
			<!-- <h2>启动中...</h2> -->
		</view>
	</view>
</template>
<script>
	import "@/static/scss/init.scss"
	export default {
		data() {
			return {
				// isVideo: true
			
				screenShow: null,
				videoContext: null,
				tiaoTime:3,
				Time: null
			}
		},
		onLoad() {
			// this.info()
			uni.showLoading({
				title:'加载中'
			})
			this.info();
			
		},
		onReady() {
			
		},
		watch:{
		},
		methods: {
            info(){
				this.$Api.accountInfo().then(res=>{
					if(res.code == 200){
						this.$store.commit('updataUserObj', res.data)
					    if(res.data.inviteCode){
							uni.switchTab({
								url: "/pages/index/index"
							});
							uni.hideLoading();
							uni.showToast({
								title:'登录成功'
							});
						}else{
							uni.redirectTo({
								url: "/pages/invite/invite"
							})
						}
						
					}
				})
			},

			
			
		}
	}
</script>

<style lang="scss">

</style>
